#ifndef _HASH_TABLE_H
#define _HASH_TABLE_H
typedef int (*EqualFunc)(ElementType, ElementType);

struct ListNode;
typedef struct ListNode *Position;
struct HashTbl;
typedef struct HashTbl *HashTable;
typedef char *ElementType;
#define MinTableSize 7
struct ListNode
{
    ElementType Element;
    Position Next;
};

typedef Position List;

struct HashTbl
{
    int TableSize;
    List *TheLists;
    EqualFunc Func;
};

typedef unsigned int Index;

HashTable InitializeTable(int TableSize, EqualFunc Func);
void DestoryTable(HashTable H);
Position Find(ElementType Key, HashTable H);
void Insert(ElementType Key, HashTable H);
ElementType Retrieve(Position P);
void Print(HashTable H);
#endif